import React, { useState, useEffect } from 'react'
import style from './Tip.module.css'
export default function Tip(props) {
    let [msgFlag, changeMsgFlag] = useState(false)
    useEffect(() => {
        if (props.msg) {
            changeMsgFlag(true)
        }
    }, [])
    return (
        <div>
            {
                msgFlag ? <div className={style.msg}>{props.msg}</div> : ''
            }
        </div>
    )
}
